<template>
  <div :style="'height:' + height+' padding-top: 10px'">
    <iframe
        :src="_url"
        frameborder="no"
        style="width: 100%; height: 100%"
        allow="camera *; microphone *"
        scrolling="auto" />
  </div>
</template>

<script setup>
import { computed} from "vue";
import { useRouter } from "vue-router";

const route = useRoute();
// const _url = computed(()=>{
//   console.log('......getQueryString("url");',getQueryString("url"))
//   return getQueryString("url");
//   // return router.currentRoute.value.meta.url
// })
const _url = ref("");
// function getQueryString (name){
//   var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
//   var r = window.location.search.substr(1).match(reg);
//   console.log('..............1',r)
//   if (r != null) {
//     return unescape(r[2]);
//   }
//   return null;
// }
const height = ref(document.documentElement.clientHeight - 94.5 + "px;")

onMounted(() => {
  _url.value = route.query?.url;
  window.onresize = function temp() {
    height.value = document.documentElement.clientHeight - 94.5 + "px;";
  };
  height.value = document.documentElement.clientHeight - 94.5 + "px;";
})
</script>
<style scoped>

</style>